package com.xia.mail;

import javax.mail.Authenticator;
import javax.mail.PasswordAuthentication;

/**
 * 验证密码
 * 
 * @author Administrators
 * 
 */
public class MailAuthenticator extends Authenticator {
	private String userName;
	private String password;

	public MailAuthenticator() {
	}

	public MailAuthenticator(String userName, String password) {
		this.userName = userName;
		this.password = password;
	}

	protected PasswordAuthentication getPasswordAuthentication() {
		return new PasswordAuthentication(this.userName, this.password);
	}

}
